package com.apex.restful.controller;

import com.apex.restful.service.TechnologicalService;
import com.apex.security.api.entity.TBsdtUserEvaluateDao;
import com.apex.security.api.service.TechnologicalCenterServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TechnologicalController implements TechnologicalCenterServiceApi {

    @Autowired
    private TechnologicalService service;

    @Override
    public String getAllList() {
        return service.getAllList();
    }

    @Override
    public String getAllListByUserId(@RequestParam("userID")String userID) {
        return service.getAllListByUserId(userID);
    }

    @Override
    public String getEntityById(@RequestParam("userID") String userID, @RequestParam("id")Long id) {
        return service.getEntityById(userID,id);
    }

    @Override
    public String getEntityByIdNoUser(@RequestParam("id")Long id) {
        return service.getEntityById(null,id);
    }

    @Override
    public String getAllDyByUserId(@RequestParam("userID")String userID) {
        return service.getAllDyByUserId(null,userID);
    }

    @Override
    public String getAllPageDyByUserId(@RequestBody String code) {
        return service.getAllDyByUserId(code,null);
    }

    @Override
    public String updateEntity(@RequestParam("userID")String userID, @RequestParam("id")Long id) {
        return service.updateEntity(userID,id);
    }

    @Override
    public String updateEntityQx(@RequestParam("userID")String userID, @RequestParam("id")Long id) {
        return service.updateEntityQx(userID,id);
    }

    @Override
    public String entityFwpj(@RequestBody TBsdtUserEvaluateDao evaluateDao) {
        return service.entityFwpj(evaluateDao);
    }

    @Override
    public String findAllByPager(@RequestBody String code) {
        return service.findAllByPager(code);
    }

    @Override
    public String findAllHotServer(@RequestBody String code) {
        return service.getAllHotServer(code);
    }
}
